import { pubRequire } from '@utils/public'
// 获取学院列表
export function getCollegeList(obj, callBack, errBack) {
  return pubRequire('get', `/colleges`, obj, callBack, errBack)
}
// 获取头图列表
export function getTopGraphList(obj, callBack, errBack) {
  return pubRequire('get', `/windows-banners`, obj, callBack, errBack)
}
// 根据学院id查询橱窗VIP课程列表
export function queryDisplayVipCourses(obj, callBack, errBack) {
  return pubRequire('get', `/windows-banners/courses`, obj, callBack, errBack)
}
// 头图详情
export function getTopGraphDetail(obj, callBack, errBack) {
  return pubRequire('get', `/windows-banners/${obj}`, obj, callBack, errBack)
}
// 删除
export function deleteTopGraph(obj, callBack, errBack) {
  return pubRequire('delete', `/windows-banners/${obj}`, obj, callBack, errBack)
}
// 发布
export function appendReleaseTopGraph(obj, callBack, errBack) {
  return pubRequire(
    'put',
    `/windows-banners/${obj}/published`,
    obj,
    callBack,
    errBack
  )
}
// 关闭
export function appendCloseTopGraph(obj, callBack, errBack) {
  return pubRequire(
    'put',
    `/windows-banners/${obj}/close`,
    obj,
    callBack,
    errBack
  )
}
// 新增
export function addTopGraph(obj, callBack, errBack) {
  return pubRequire('post', `/windows-banners`, obj, callBack, errBack)
}
// 编辑
export function editTopGraph(obj, callBack, errBack) {
  return pubRequire('put', `/windows-banners/${obj.id}`, obj, callBack, errBack)
}
